﻿
namespace LEEAAttendanceControl.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;
    using LEEAAttendanceControl.Web.Resources;


    // The MetadataTypeAttribute identifies AttendanceMetadata as the class
    // that carries additional metadata for the Attendance class.
    [MetadataTypeAttribute(typeof(Attendance.AttendanceMetadata))]
    public partial class Attendance
    {

        // This class allows you to attach custom attributes to properties
        // of the Attendance class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class AttendanceMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private AttendanceMetadata()
            {
            }

            public int AttendanceID { get; set; }

            public Nullable<DateTime> DataTime { get; set; }

            public Nullable<int> EmployeeID { get; set; }

            public string PunchType { get; set; }

            public Nullable<int> ShiftID { get; set; }

            public Nullable<int> Status { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies PunchMetadata as the class
    // that carries additional metadata for the Punch class.
    [MetadataTypeAttribute(typeof(Punch.PunchMetadata))]
    public partial class Punch
    {

        // This class allows you to attach custom attributes to properties
        // of the Punch class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class PunchMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private PunchMetadata()
            {
            }

            public Nullable<DateTime> DataTime { get; set; }

            public Nullable<int> EmployeeID { get; set; }

            public int PunchID { get; set; }

            public string PunchType { get; set; }

            public Nullable<int> RelatedPunch { get; set; }

            public Nullable<int> ShiftID { get; set; }

            public Nullable<int> Status { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies WorkDayMetadata as the class
    // that carries additional metadata for the WorkDay class.
    [MetadataTypeAttribute(typeof(WorkDay.WorkDayMetadata))]
    public partial class WorkDay
    {

        // This class allows you to attach custom attributes to properties
        // of the WorkDay class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class WorkDayMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private WorkDayMetadata()
            {
            }

            public int CompanyID { get; set; }

            public int DayID { get; set; }

            public int WorkDayID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ChangeMetadata as the class
    // that carries additional metadata for the Change class.
    [MetadataTypeAttribute(typeof(Change.ChangeMetadata))]
    public partial class Change
    {

        // This class allows you to attach custom attributes to properties
        // of the Change class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ChangeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ChangeMetadata()
            {
            }

            public Nullable<int> AttendanceID { get; set; }

            public Nullable<DateTime> ChangeDate { get; set; }

            public int ChangeID { get; set; }

            public Nullable<int> EmployeeID { get; set; }

            public Nullable<DateTime> TimeAfter { get; set; }

            public Nullable<DateTime> TimeBefore { get; set; }

            public Nullable<int> UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CompanyMetadata as the class
    // that carries additional metadata for the Company class.
    [MetadataTypeAttribute(typeof(Company.CompanyMetadata))]
    public partial class Company
    {

        // This class allows you to attach custom attributes to properties
        // of the Company class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CompanyMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CompanyMetadata()
            {
            }
            [Key]
            public int ID { get; set; }

            [Required(ErrorMessageResourceName = "CompanyAbrrevation", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Abr { get; set; }
            
            [Required(ErrorMessageResourceName = "CompanyAddress1", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            [Display(Name = "Address(1)")]
            public string Adr1 { get; set; }

            public string Adr2 { get; set; }

            [Required(ErrorMessageResourceName = "CompanyCity", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string City { get; set; }

            [Required]
            [Display(Name = "Company Id")]
            public Nullable<int> CompanyID { get; set; }
            
            [Required(ErrorMessageResourceName = "CompanyName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string CompanyName { get; set; }

            [Required(ErrorMessageResourceName = "CompanyCountry", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Country { get; set; }

            [Required(ErrorMessageResourceName = "CompanyDescription", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Description { get; set; }

            [Required(ErrorMessageResourceName = "CompanyRegion", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Region { get; set; }

            [Required(ErrorMessageResourceName = "CompanyState", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string State { get; set; }

            public Boolean OverTime { get; set; }
            
            public Nullable<DateTime> MinTimeBetweenPunches { get; set; }
            
            public EntityCollection<Department> Departments { get; set; }

            public EntityCollection<Employee> Employees { get; set; }

            public EntityCollection<Exeption> Exeptions { get; set; }

            public EntityCollection<Shift> Shifts { get; set; }

        }
    }

    // The MetadataTypeAttribute identifies DailyOvertimeApprovalMetadata as the class
    // that carries additional metadata for the DailyOvertimeApproval class.
    [MetadataTypeAttribute(typeof(DailyOvertimeApproval.DailyOvertimeApprovalMetadata))]
    public partial class DailyOvertimeApproval
    {

        // This class allows you to attach custom attributes to properties
        // of the DailyOvertimeApproval class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class DailyOvertimeApprovalMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private DailyOvertimeApprovalMetadata()
            {
            }

            public Nullable<bool> Approval { get; set; }

            public Employee Employee { get; set; }

            public Nullable<int> EmployeeID { get; set; }

            public Nullable<int> OvertimeHours { get; set; }

            public int OvertimeID { get; set; }

            public Nullable<DateTime> RecordDate { get; set; }

            public Nullable<int> TotalHours { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies DepartmentMetadata as the class
    // that carries additional metadata for the Department class.
    [MetadataTypeAttribute(typeof(Department.DepartmentMetadata))]
    public partial class Department
    {

        // This class allows you to attach custom attributes to properties
        // of the Department class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class DepartmentMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private DepartmentMetadata()
            {
            }
            [Required(ErrorMessageResourceName = "CompanyId", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> CompanyID { get; set; }

            [Key]
            public int DepartmentID { get; set; }

            [Required(ErrorMessageResourceName = "DepartmentCode", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> DepartmentCode { get; set; }

            [Required(ErrorMessageResourceName = "DepartmentName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string DepartmentName { get; set; }

            [Include]
            public Company Company { get; set; }

            public EntityCollection<Employee> Employees { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies EmployeeMetadata as the class
    // that carries additional metadata for the Employee class.
    [MetadataTypeAttribute(typeof(Employee.EmployeeMetadata))]
    public partial class Employee
    {

        // This class allows you to attach custom attributes to properties
        // of the Employee class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class EmployeeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private EmployeeMetadata()
            {
            }

            public int EmployeeID { get; set; }
            [Required(ErrorMessageResourceName = "CompanyId", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> CompanyID { get; set; }
            [Required(ErrorMessageResourceName = "DepartmentId", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> DepartmentID { get; set; }
            [Required(ErrorMessageResourceName = "JobId", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> JobId { get; set; }
            public Nullable<int> EmployeeCode { get; set; }
            [Required(ErrorMessageResourceName = "CardNo", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> CardNo { get; set; }
            [Required(ErrorMessageResourceName = "FirstName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string FirstName { get; set; }
            [Required(ErrorMessageResourceName = "LastName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string LastName { get; set; }
            [Required(ErrorMessageResourceName = "EmploymentDate", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<DateTime> EmploymentDate { get; set; }
            public Nullable<bool> Active { get; set; }
            //[Required(ErrorMessageResourceName = "Address", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Address { get; set; }
            [Required(ErrorMessageResourceName = "Phone", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Phone { get; set; }
            [Required(ErrorMessageResourceName = "Mobile", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Mobile { get; set; }
            [Required(ErrorMessageResourceName = "BirthDate", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<DateTime> BirthDate { get; set; }
            [Required(ErrorMessageResourceName = "Login", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Login { get; set; }
            [Required(ErrorMessageResourceName = "Password", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Password { get; set; }
            public Nullable<int> RoleID { get; set; }
            public string SurePayrollCode { get; set; }
            public Byte[] FingerTemplate { get; set; }
            public Nullable<int> FingerChecksum1 { get; set; }
            public Nullable<int> FingerChecksum2 { get; set; }
            public Nullable<int> UserLevel { get; set; }
            public Nullable<int> SecurityLevel { get; set; }
            public Nullable<int> CardType { get; set; }
            public Nullable<int> AuthMode { get; set; }
            public Nullable<int> Handle { get; set; }
            [Include]
            public Company Company { get; set; }
            [Include]
            public Department Department { get; set; }
            public EntityCollection<DailyOvertimeApproval> DailyOvertimeApprovals { get; set; }
            public EntityCollection<ExceptionAssignment> ExceptionAssignments { get; set; }
            public EntityCollection<ShiftAssignment> ShiftAssignments { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ExceptionAssignmentMetadata as the class
    // that carries additional metadata for the ExceptionAssignment class.
    [MetadataTypeAttribute(typeof(ExceptionAssignment.ExceptionAssignmentMetadata))]
    public partial class ExceptionAssignment
    {

        // This class allows you to attach custom attributes to properties
        // of the ExceptionAssignment class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ExceptionAssignmentMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ExceptionAssignmentMetadata()
            {
            }

            public Nullable<DateTime> DateFrom { get; set; }

            public Nullable<DateTime> DateTo { get; set; }

            public Employee Employee { get; set; }

            public Nullable<int> EmployeeID { get; set; }

            public Exeption Exeption { get; set; }

            public Nullable<int> ExceptionID { get; set; }

            public int ID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ExeptionMetadata as the class
    // that carries additional metadata for the Exeption class.
    [MetadataTypeAttribute(typeof(Exeption.ExeptionMetadata))]
    public partial class Exeption
    {

        // This class allows you to attach custom attributes to properties
        // of the Exeption class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ExeptionMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ExeptionMetadata()
            {
            }

            [Required(ErrorMessageResourceName = "Color", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> Color { get; set; }

            public Company Company { get; set; }

            [Required(ErrorMessageResourceName = "ExceptionCompany", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> CompanyID { get; set; }

            public string Description { get; set; }

            [Required(ErrorMessageResourceName = "ExceptionPaidHours", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<Decimal> DPH { get; set; }

            [Key]
            public int ID { get; set; }

            [Required(ErrorMessageResourceName = "ExceptionName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies HourMetadata as the class
    // that carries additional metadata for the Hour class.
    [MetadataTypeAttribute(typeof(Hour.HourMetadata))]
    public partial class Hour
    {

        // This class allows you to attach custom attributes to properties
        // of the Hour class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class HourMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private HourMetadata()
            {
            }

            public int HoursID { get; set; }

            public int EmployeeID { get; set; }

            public int PunchINID { get; set; }
            public int PunchOUTID { get; set; }

            public int ShiftID { get; set; }
            public string ShiftName { get; set; }

            public DateTime ActualIN { get; set; }
            public DateTime RoundedIN { get; set; }

            public DateTime ActualOUT { get; set; }
            public DateTime RoundedOUT { get; set; }

            public int ActualHours { get; set; }
            public int RoundedHours { get; set; }

            public int BreakTime { get; set; }

            public int ActualOvertime { get; set; }
            public int RoundedOvertime { get; set; }

            public string DayType { get; set; }

            public string Color { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies JobMetadata as the class
    // that carries additional metadata for the Job class.
    [MetadataTypeAttribute(typeof(Job.JobMetadata))]
    public partial class Job
    {

        // This class allows you to attach custom attributes to properties
        // of the Job class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class JobMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private JobMetadata()
            {
            }
            
            [Required]
            public Nullable<int> CustomJobID { get; set; }

            public string Description { get; set; }

            [Key]
            public int JobID { get; set; }

            [Required(ErrorMessageResourceName = "JobName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string JobName { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies RoleMetadata as the class
    // that carries additional metadata for the Role class.
    [MetadataTypeAttribute(typeof(Role.RoleMetadata))]
    public partial class Role
    {

        // This class allows you to attach custom attributes to properties
        // of the Role class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class RoleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private RoleMetadata()
            {
            }

            public int RoleID { get; set; }

            public string RoleName { get; set; }

            public EntityCollection<User> Users { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies SettingMetadata as the class
    // that carries additional metadata for the Setting class.
    [MetadataTypeAttribute(typeof(Setting.SettingMetadata))]
    public partial class Setting
    {

        // This class allows you to attach custom attributes to properties
        // of the Setting class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class SettingMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private SettingMetadata()
            {
            }

            public string AccountingPeriod { get; set; }

            public string AutoRegistration { get; set; }

            public string BiWeeklyInitialDate { get; set; }

            public string Calculation { get; set; }

            public string DefaultCompanyID { get; set; }

            public string DepartmentTreeState { get; set; }

            public string DeviceIDLength { get; set; }

            public string FirstDayOfWeek { get; set; }

            public string FirstStart { get; set; }

            public string FriTime { get; set; }

            public string HistoryFolder { get; set; }

            public int ID { get; set; }

            public string MinBreakDeduction { get; set; }

            public string MinIntervalRegistration { get; set; }

            public string MonTime { get; set; }

            public string NonShiftBreak { get; set; }

            public string OvertimeRate { get; set; }

            public string PeriodFrom { get; set; }

            public string PeriodTo { get; set; }

            public string Preferences { get; set; }

            public string ReportPeriodFrom { get; set; }

            public string ReportPeriodTo { get; set; }

            public string RoundingTimeForWorkstation { get; set; }

            public string SatTime { get; set; }

            public string SelectedOption { get; set; }

            public string SetJobCosting { get; set; }

            public string ShowGettingStarted { get; set; }

            public string SunTime { get; set; }

            public string ThuTime { get; set; }

            public string TimeDriverFolderPath { get; set; }

            public string TimeSettings { get; set; }

            public string Toolbars { get; set; }

            public string TueTime { get; set; }

            public string WedTime { get; set; }

            public string WeeklyOvertime { get; set; }

            public string WeeklyTime { get; set; }

            public string WorkFolder { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ShiftMetadata as the class
    // that carries additional metadata for the Shift class.
    [MetadataTypeAttribute(typeof(Shift.ShiftMetadata))]
    public partial class Shift
    {

        // This class allows you to attach custom attributes to properties
        // of the Shift class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ShiftMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ShiftMetadata()
            {
            }

            [Required(ErrorMessageResourceName = "BreakTime", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> BreakTime { get; set; }

            [Required(ErrorMessageResourceName = "Color", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Color { get; set; }

            public string ForeColor { get; set; }

            public Company Company { get; set; }

            [Required(ErrorMessageResourceName = "ShiftCompanyID", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> CompanyID { get; set; }

            [Required(ErrorMessageResourceName = "DateFrom", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<DateTime> DateFrom { get; set; }

            public Nullable<DateTime> DateTo { get; set; }

            public Nullable<bool> Deleted { get; set; }

            public Nullable<int> FirstPeriodIN { get; set; }

            public Nullable<int> FirstPeriodOUT { get; set; }

            public Nullable<int> GraceIN { get; set; }

            public Nullable<int> GraceOUT { get; set; }
            
            [Key]
            public int ID { get; set; }

            public Nullable<int> MinBreakDeduction { get; set; }

            public Nullable<int> RountingTimeIN { get; set; }

            public Nullable<int> RountingTimeOUT { get; set; }

            public Nullable<int> ShiftID { get; set; }

            [Required(ErrorMessageResourceName = "ShiftName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string ShiftName { get; set; }

            [Required(ErrorMessageResourceName = "TimeFrom", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<DateTime> TimeFrom { get; set; }

            [Required(ErrorMessageResourceName = "TimeTo", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<DateTime> TimeTo { get; set; }

            public Nullable<int> WeeklyTime { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ShiftAssignmentMetadata as the class
    // that carries additional metadata for the ShiftAssignment class.
    [MetadataTypeAttribute(typeof(ShiftAssignment.ShiftAssignmentMetadata))]
    public partial class ShiftAssignment
    {

        // This class allows you to attach custom attributes to properties
        // of the ShiftAssignment class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ShiftAssignmentMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ShiftAssignmentMetadata()
            {
            }

            public Nullable<short> AssignmentDays { get; set; }

            public Nullable<DateTime> AssignmentFrom { get; set; }

            public Nullable<DateTime> AssignmentTo { get; set; }

            public Nullable<short> AutoPunches { get; set; }

            public Employee Employee { get; set; }

            public Nullable<int> EmployeeID { get; set; }

            public int ID { get; set; }

            public Nullable<int> ShiftID { get; set; }

            public EntityCollection<ShiftAssignmentDay> ShiftAssignmentDays { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ShiftAssignmentDayMetadata as the class
    // that carries additional metadata for the ShiftAssignmentDay class.
    [MetadataTypeAttribute(typeof(ShiftAssignmentDay.ShiftAssignmentDayMetadata))]
    public partial class ShiftAssignmentDay
    {

        // This class allows you to attach custom attributes to properties
        // of the ShiftAssignmentDay class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ShiftAssignmentDayMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ShiftAssignmentDayMetadata()
            {
            }

            public int DayID { get; set; }

            public int ID { get; set; }

            public ShiftAssignment ShiftAssignment { get; set; }

            public int ShiftAssignmentID { get; set; }

            public WeekDay WeekDay { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies sysdiagramMetadata as the class
    // that carries additional metadata for the sysdiagram class.
    [MetadataTypeAttribute(typeof(sysdiagram.sysdiagramMetadata))]
    public partial class sysdiagram
    {

        // This class allows you to attach custom attributes to properties
        // of the sysdiagram class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class sysdiagramMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private sysdiagramMetadata()
            {
            }

            public byte[] definition { get; set; }

            public int diagram_id { get; set; }

            public string name { get; set; }

            public int principal_id { get; set; }

            public Nullable<int> version { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies UserMetadata as the class
    // that carries additional metadata for the User class.
    [MetadataTypeAttribute(typeof(User.UserMetadata))]
    public partial class User
    {

        // This class allows you to attach custom attributes to properties
        // of the User class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class UserMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private UserMetadata()
            {
            }

            public Nullable<bool> Active { get; set; }

            public Nullable<int> CompanyID { get; set; }

            public Nullable<int> DepartmentID { get; set; }

            [Required(ErrorMessageResourceName = "UserFirstName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string FirstName { get; set; }

            [Required(ErrorMessageResourceName = "UserLastName", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string LastName { get; set; }

            [Required(ErrorMessageResourceName = "UserLogin", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            //[UserLoginValidation]
            public string Login { get; set; }

            [Required(ErrorMessageResourceName = "UserPassword", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public string Password { get; set; }

            [Required(ErrorMessageResourceName = "UserRole", ErrorMessageResourceType = typeof(ValidationErrorResources))]
            public Nullable<int> Role { get; set; }

            public Role Role1 { get; set; }

            [Key]
            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies VersionMetadata as the class
    // that carries additional metadata for the Version class.
    [MetadataTypeAttribute(typeof(TVersion.VersionMetadata))]
    public partial class TVersion
    {

        // This class allows you to attach custom attributes to properties
        // of the Version class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class VersionMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private VersionMetadata()
            {
            }

            public Nullable<DateTime> Date { get; set; }

            public int Version1 { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies WeekDayMetadata as the class
    // that carries additional metadata for the WeekDay class.
    [MetadataTypeAttribute(typeof(WeekDay.WeekDayMetadata))]
    public partial class WeekDay
    {

        // This class allows you to attach custom attributes to properties
        // of the WeekDay class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class WeekDayMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private WeekDayMetadata()
            {
            }

            public int DayID { get; set; }

            public string DayName { get; set; }

            public EntityCollection<ShiftAssignmentDay> ShiftAssignmentDays { get; set; }
        }
    }


    // The MetadataTypeAttribute identifies WeekDayMetadata as the class
    // that carries additional metadata for the WeekDay class.
    [MetadataTypeAttribute(typeof(WorkTime.WorkTimeMetadata))]
    public partial class WorkTime
    {

        // This class allows you to attach custom attributes to properties
        // of the WeekDay class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class WorkTimeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private WorkTimeMetadata()
            {
            }

            public int ID { get; set; }

            public int CompanyId { get; set; }

            public int DayId { get; set; }
            
            public int Time { get; set; }
            [Include]
            public WeekDay WeekDay { get; set; }
           
        }
    }





    // The MetadataTypeAttribute identifies WeekDayMetadata as the class
    // that carries additional metadata for the WeekDay class.
    [MetadataTypeAttribute(typeof(Location.LocationMetadata))]
    public partial class Location
    {

        // This class allows you to attach custom attributes to properties
        // of the WeekDay class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class LocationMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private LocationMetadata()
            {
            }

            public int LocationId { get; set; }

            public string Name { get; set; }

            public string DeviceId { get; set; }

  
        }
    }


}
